package com.qiye.livevideo.service.impl;

import com.qiye.livevideo.dao.UserDao;
import com.qiye.livevideo.model.User;
import com.qiye.livevideo.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


/**
 *用户表 serverImpl
 * @author tongling
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {


	/**
	 * 注入dao
	 */
	@Resource
	private UserDao userDao;
	/**
	 * 初始化
	 */
	@Override
	public UserDao initDao(){
		return userDao;
	}

	/**
	 * 根据openId查找用户信息
	 * @param openId
	 * @return
	 */
	@Override
	public User findUserByOpenId(String openId) {
		return userDao.findUserByOpenId(openId);
	}

}
